<script setup lang="ts">
import { useRoute } from "vue-router";
//引入子组件
import Detail from "./Detail.vue";
import AllOrder from "./AllOrder.vue";
//获取路由对象
let $route = useRoute();
</script>

<template>
    <div v-if="$route.query.orderId">
        <Detail />
    </div>
    <div v-else>
        <AllOrder />
    </div>
</template>

<style scoped lang="scss">

</style>